using System;
using System.Collections.Generic;
using System.Linq;
namespace MicroMsg.Storage
{
	public class MobileContactStorage : StorageTable<MobileContact, string>
	{
		public MobileContactStorage() : base((MobileContact mc) => mc.strMD5)
		{
		}
		public MobileContact method_7(string strMD5)
		{
			if (string.IsNullOrEmpty(strMD5))
			{
				return null;
			}
			return base.method_2((MobileContact m) => m.strMD5 == strMD5);
		}
		public MobileContact getByUserName(string strUserName)
		{
			if (string.IsNullOrEmpty(strUserName))
			{
				return null;
			}
			return base.method_2((MobileContact m) => m.strUsrName == strUserName);
		}
		public bool delMobileContact(long lastUpdateTime)
		{
			return base.method_6((MobileContact m) => m.lastUpdateTime < lastUpdateTime);
		}
		public List<MobileContact> getHasNotUploadedContact()
		{
			return base.getList((MobileContact m) => m.nUploadTime == 0L && m.strMD5 != null);
		}
		public bool updateList(List<MobileContact> mbileContactList)
		{
			return base.updateList<string>(mbileContactList, (MobileContact r) => r.strMD5);
		}
		public List<MobileContact> getHasUserNameContact()
		{
			return base.getList((MobileContact mContact) => mContact.strUsrName != null && mContact.strUsrName != "");
		}
		public bool updateListExceptUploadTime(List<MobileContact> mbileContactList)
		{
			return mbileContactList != null && Enumerable.Count<MobileContact>(mbileContactList) > 0 && base.updateList<string>(mbileContactList, (MobileContact m) => m.strMD5);
		}
	}
}
